#ifndef __CLI_WRAPPER_H__
#define __CLI_WRAPPER_H__
#include "common.h"
#include "define_macro.h"
#include <vector>
#include <string>
class CLIPath{
public:
	bool Initialize(const std::string& separator="/",
			const std::string& initPath="/" );

	bool RevisePath( const std::string& path );
		
	void ParsePath( const std::string& path, std::vector<std::string>& pathVec );
	std::string BuildPath() const;
protected:
	void MergePath( const std::vector<std::string>& pathVec, bool fromRoot );
private:
	DEFINE_MEMBER( std::vector<std::string>	, PathVec	)
	DEFINE_MEMBER( std::string		, Separator	)
};

class CLIWrapper:public CLIPath{
public:
	CLIWrapper();
	~CLIWrapper();

	bool Initialize(	const std::string& prefix="[",
				const std::string& suffix="]",
				const std::string& prompt=">",
				const std::string& separator = "/",
				const std::string& initPath ="/" );

	void AppendPath(	const std::string& subPath );

	char * GetLine(		const std::string& path="",
				const std::string& prompt="");

	std::string BuildPrompt() const;
private:
	DEFINE_MEMBER( std::string, Prompt)
	DEFINE_MEMBER( std::string, Suffix)
	DEFINE_MEMBER( std::string, Prefix)
};

#endif

